Automated lens adjustment for hyperspectral imaging

ABSTRACT

A system and method for automated lens adjustment for hyperspectral imaging is described. The system includes an image sensor and an electrically-controllable element arranged to set a spectral band for image capture by (i) selectively providing light for a selected spectral band or (ii) selectively filtering light to a selected spectral band. The system includes a tunable lens that is adjustable to change a focal length of the lens; and one or more data storage devices storing data that indicates different focus adjustment parameters corresponding to different spectral bands. The system includes a control system configured to perform operations including: selecting a spectral band; controlling the electrically-controllable element to set the spectral band for image capture; retrieving the focus adjustment parameter that corresponds to the spectral band; adjusting the lens based on the retrieved focus adjustment parameter; and capturing an image of the subject while the lens remains adjusted.

TECHNICAL FIELD

This disclosure application relates generally to imaging systems.

BACKGROUND

Optical imaging systems can generate images of objects. The images may be generated by collecting light waves through a lens, and focusing the light waves on a sensor. Light waves from different spectral bands may focus at different distances when passing through a lens.

SUMMARY

In some implementations, a system is configured to capture images using light from different spectral bands. The system includes a light source that can selective illuminate a subject with light of different spectral bands. The system also includes an electrically tunable lens (e.g., an electrically focus-tunable lens) that is used to adjust the focus of a camera for whichever spectral band of light is used to illuminate the subject (e.g., a target or object to be photographed). The tunable lens can be used to adjust the focus for the camera for each spectral band, so that images captured using the respective spectral bands have consistent, accurate focus.

Many lens and lens assemblies exhibit chromatic aberration, where the effective focal distance or focal length of a lens assembly is slightly different for different wavelengths. The refractive index of lens elements typically varies with the wavelength of light, resulting in changes in focal length for different wavelength. As a result, when light from one spectral band is focused to the plane of the image sensor, for that same lens configuration, light from some spectral bands would be focused in front of the image sensor while light from other spectral bands would be focused behind the image sensor. The difference in effective focal lengths for different wavelengths is especially pronounced when a lens is used over a wide range of wavelengths, such as for hyperspectral imaging where light in the ultraviolet, visible, and infrared ranges may be used. As discussed below, the tunable lens can be used to correct for these differences and provide correct focus for each of the different spectral bands.

The systems of the present disclosure can include a lens assembly that includes one or more solid lens elements (such as those made of glass, plastic, fluorite, etc.), in which each element has a traditional fixed focal length. The system can also include a tunable lens to make adjustments to compensate for the different ways that different spectral bands interact with the lens assembly. For example, the lens assembly can be adjusted to obtain a primary focus position with respect to a subject, e.g., using manual focus or autofocus techniques and a reference band of light, such as visible light. When capturing images using a second spectral band, however, the system automatically adjusts the focus of the tunable lens to correct for the difference between effective focal distance of the lens assembly for the reference band and the second band, thus maintaining accurate focus on the subject even though a different band of light is used.

The system can store adjustment data that indicates how the tunable lens should be adjusted for each of the different spectral bands that the system supports. This allows the system to provide high-quality results and consistent focus for all of the spectral bands. It also speeds the process of capturing images of a subject using multiple different spectral bands. For example, the system may be configured to capture ten images of a subject, each using light of a different spectral band. The system cycles through the ten different spectral bands, instructing the light source to produce light of each band in turn. As the system changes the spectral band used for illumination, the system also retrieves the adjustment data for the current spectral band and configures the tunable lens to provide the appropriate correction that was previously determined and stored for the current spectral band. In this manner, for each spectral band of illumination, the system automatically applies the corresponding predetermined correction to the tunable lens, resulting in reflected light from the subject being appropriately focused on the plane of the image sensor even though different spectral bands are used.

The techniques discussed herein can be used to generate hyperspectral images, e.g., a set of images including an image for each of multiple spectral bands of light. For example, the spectral bands for a hyperspectral image data set can include one or more bands of visible light, and can also include bands with wavelengths that fall outside the range of visible light, such as bands of ultraviolet light and bands of infrared light. In general, hyperspectral imaging can acquire a hyperspectral data cube, which includes a set of images with each image representing the detected light intensity for a subject for a small band of wavelengths of light.

The systems discussed herein can enable the rapid and efficient capture of high-quality hyperspectral images, having consistent effective focus for each spectral band without the need to evaluate or optically verify focus for each spectral band. For example, to capture a hyperspectral image of a subject, a main focus position can be determined once for the subject using focus adjustment of the lens assembly (e.g., with electromechanical focusing, whether manually or with autofocus processing). This main focus position can be determined with the tunable lens at a default or neutral focal length, and the main focus position for the lens assembly can be maintained for capture of all images in the hyperspectral image set. However, some or all of the images in the hyperspectral image set can be captured using different adjustments applied to the tunable lens, to maintain consistent focus across the image set. As the system instructs the light source to produce the next band of illumination, the system also retrieves and applies the stored adjustment parameter for that band using the tunable lens. As a result, the tunable lens can be adjusted to correct the focus with minimal latency, even before the illumination with that spectral band begins. In addition, this allows rapid capture of images for different spectral bands in sequence, because the application of the adjustment parameters can be done without requiring measurement or feedback during the process.

A camera with a tunable lens may be used to obtain images of samples, or subjects. Samples can include, for example, fruit to be inspected for indications of ripeness, bruises, decay, and mold. Images of fruit generated using hyperspectral light may be more accurate and detailed than images of fruit generated using primarily red, green, and blue (RGB) visible light. For example, indications of bruises, mold, and decay that are not visible when illuminated with RGB light may become visible when illuminated with hyperspectral light. Thus, fruit inspection using hyperspectral imaging may enable earlier detection of fruit defects, compared to fruit inspection using RGB imaging.

In some examples, a camera may be positioned so that a sample is within the camera's field of view. The camera and the sample may be positioned within a dark chamber, or “black box,” that seals out external light. The sample can be illuminated with a light source that produces light of various wavelengths. The light source can be directed by a computer to produce light that scans sequentially through different spectral bands of the electromagnetic spectrum, allowing an image to be captured for each of the spectral bands.

For example, the light source can produce light with small wavelengths, e.g., in a visible violet spectral band of the visible electromagnetic spectrum, and then can adjust the wavelengths to become progressively larger as the light source produces light in other visible color spectral bands, eventually reaching the infrared band of the electromagnetic spectrum. The computer may control the light produced by the light source by sending a signal to the light source to produce light of a certain wavelength at a certain time.

Light produced by the light source can reflect off of the sample and be received by the camera, through the tunable lens. Light waves with different wavelengths behave differently when the light waves interact with a lens. Light with smaller wavelengths generally diffract, or bend, more than light with larger wavelengths. To focus light from various wavelengths onto a sensor of the camera at a particular focal length, and produce a high quality image, the lens can adjust one or more focus adjustment parameters. For example, the lens can adjust its position, e.g., deflection.

The computer that controls the light source can also control the tunable lens. The computer may store a data table that associates each wavelength with a lens position that can focus the particular wavelength at the desired focal length, e.g., the focal length of the camera sensor. When the computer sends the signal to the light source to produce light of a certain wavelength, the computer can reference the table in order to determine the corresponding lens position. The computer can then send a signal to the tunable lens to adjust position based on the wavelength of light that is being produced by the light source. Thus, the tunable lens can be tuned for the wavelength of light that is being produced by the light source, at approximately the same time.

In some cases, the tunable lens can adjust position based on sample range, or distance between the tunable lens and the sample, as well as based on light wavelength. For example, the computer may first calculate a lens position adjustment based on range, and then apply a correction factor based on wavelength. In some examples, the computer can store a data table that associates lens position with both sample range and wavelength.

In some examples, instead of or in addition to using a dark chamber to keep out external light, the camera can use filters to filter out light. The filters may be part of a filter wheel that can rotate in front of the tunable lens. Different sections of the filter wheel can filter out different wavelengths, only allowing a narrow band of wavelengths to pass to the camera. The light source can then produce light of many different wavelengths at the same time. In this case, instead of sending a signal to the light source to select the illumination wavelength, the computer can send a signal to the filter wheel to select the wavelength that is allowed to pass through the filter. The computer can then adjust the tunable lens based on the wavelength that passes through the filter.

In some examples, two or more cameras can be used to obtain hyperspectral images using tunable lenses. Each camera may be able to detect light within a certain range of wavelengths. For example, a first camera may detect ultraviolet light, while a second camera may detect visible light. The two or more cameras may be spaced apart from each other, e.g., at different ranges from the sample. The computer can control the tunable lenses for each camera based on the wavelength and based on the range of each camera to the sample.

One innovative aspect of the subject matter described in this specification is embodied in methods that include the actions of storing, in one or more data storage devices, focus adjustment data for an imaging system that includes a tunable lens. The imaging system includes an electrically-controllable element configured to selectively set each of multiple different spectral bands for image capture, and the focus adjustment data indicates different focus adjustment parameters corresponding to the different spectral bands. The methods include selecting a spectral band from among the multiple different spectral bands; controlling the electrically-controllable element to set the selected spectral band for image capture; retrieving the focus adjustment parameter that corresponds to the selected spectral band; controlling the tunable lens to adjust the tunable lens based on the retrieved focus adjustment parameter that corresponds to the selected spectral band; and capturing an image of the subject using the image sensor while the electrically-controllable element sets the selected spectral band for image capture and while the tunable lens is adjusted based on the retrieved focus adjustment parameter that corresponds to the selected spectral band.

Other embodiments of this and other aspects include corresponding systems, apparatus, and computer programs, configured to perform the actions of the methods, encoded on computer storage devices. A system of one or more computers or other processing devices can be so configured by virtue of software, firmware, hardware, or a combination of them installed on the system that in operation cause the system to perform the actions. One or more computer programs can be so configured by virtue having instructions that, when executed by data processing apparatus, cause the apparatus to perform the actions.

These and other embodiments may each optionally include one or more of the following features. In some implementations, the operations include capturing a set of hyperspectral image data for the subject, the set of hyperspectral image data including an image for each of the multiple different spectral bands, each of the images is captured while (i) the electrically-controllable element sets a different spectral band for image capture and (ii) the tunable lens is adjusted according to the focus adjustment parameter that corresponds to the spectral band set for image capture by the electrically-controllable element.

In some implementations, the operations include determining a sequence in which to illuminate the subject in the different spectral bands of light; controlling the electrically-controllable element to sequentially set different spectral bands of light for image capture in the determined sequence; and adjusting the tunable lens to sequentially apply the focus adjustment parameters for the different spectral bands in a sequence that corresponds to the sequence for illuminating the subject, changes to the adjustment of the tunable lens are synchronized with changes in the spectral band of light set by the electrically-controllable element.

In some implementations, the multiple different spectral bands include multiple spectral bands outside a visible range of light.

In some implementations, the focus adjustment parameters include, for each of multiple spectral bands, a predetermined adjustment for the spectral band that is configured to compensate for a difference between (i) a focal length of the lens assembly for the spectral band and (ii) a focal length of the lens assembly for a reference spectral band.

In some implementations, the tunable lens is an electro-wetting lens, a liquid crystal lens, or a polymer-based liquid lens.

In some implementations, the control system is configured to instruct the adjustment to the tunable lens based on the retrieved focus adjustment parameter that corresponds to the selected spectral band before the electrically-controllable element adjusts the system to use light of the selected spectral band.

In some implementations, the electrically-controllable element is a light source including a set of light-producing elements that are configured to produce light of the different spectral bands, and the control system is configured to selectively activate the light-producing elements.

In some implementations, the electrically-controllable element is a filter assembly including multiple filters each configured to filter light to provide a different one of the different spectral bands, and the control system is configured to selectively apply the filters to set the selected spectral band for image capture.

In some implementations, the control system is configured to perform autofocus adjustment to set a focus position of the lens assembly or the tunable lens based on a distance of the subject from the image sensor, and the adjustment to the tunable lens based on the retrieved focus adjustment parameter is applied in addition to the autofocus adjustment.

In some implementations, the focus adjustment data includes a lookup table including one or more focus adjustment parameters for each of the different spectral bands.

The techniques presented herein provide at least the following technical advantages and/or technical improvements over previously available solutions. An advantage of hyperspectral lens focusing is that the camera can produce very high quality images using light from a broad range of the electromagnetic spectrum. Many lenses are optimized to focus light from RGB spectral bands at the focal length of the camera sensor. Light with wavelengths that fall between RGB spectral bands, and outside of RGB spectral bands, may therefore focus at different focal lengths when passing through the lenses. Therefore, the resulting images may exhibit optical aberration. The optical aberration can cause an image to appear blurred and distorted. An electrically tunable lens can adjust to focus light that is between the RGB spectral bands, and light that is beyond the visible spectrum, e.g., in infrared spectral bands, onto the camera sensor.

Another advantage of hyperspectral lens focusing is that adjusting the lens position based on the light wavelength can be done quickly. Many camera systems adjust focus for a particular scene after receiving light from the scene. This can result in a time delay between the camera receiving the light and focusing the light. In contrast, using hyperspectral lens focusing techniques, a camera can adjust the tunable lens position based on a particular wavelength in advance, e.g., before receiving light at the particular wavelength. Thus, when the tunable lens receives light at the particular wavelength, the tunable lens may be already adjusted to focus the light at the appropriate focal length. This can reduce delays between receiving the light and focusing the light on the camera sensor.

Methods in accordance with the present disclosure may include any combination of the aspects and features described herein. That is, methods in accordance with the present disclosure are not limited to the combinations of aspects and features specifically described herein, but also include any combination of the aspects and features provided.

The details of one or more implementations of the present disclosure are set forth in the accompanying drawings and the description below. Other features and advantages of the present disclosure will be apparent from the description and drawings, and from the claims.

DESCRIPTION OF DRAWINGS

FIG. 1A shows an example system for hyperspectral imaging providing automated lens adjustment.

FIG. 1B shows another example system for hyperspectral imaging providing automated lens adjustment.

FIG. 1C shows an example of different wavelength bands.

FIG. 2A shows an example diagram of tunable lens positions.

FIG. 2B shows an example table associating light wavelengths with lens positions.

FIG. 3 shows an example system for hyperspectral imaging using multiple cameras.

FIG. 4A shows an example diagram of tunable lens positions.

FIG. 4B shows an example table associating light wavelengths and sample distances with lens positions.

FIG. 5 shows a flow chart of an example process for hyperspectral optical lens focusing.

Like reference symbols in the various drawings indicate like elements.

DETAILED DESCRIPTION

FIG. 1A shows an example system 100 a for hyperspectral imaging providing automated lens adjustment. The system 100 a includes a camera 106 a, a lens assembly 108 a, a tunable lens 110 a, a light source 105 a, and a dark chamber 102 a. The camera 106 a, the tunable lens 110 a, and the light source 105 a may be in communication with a computer 120 a or other control system. For example, the camera 106 a, the tunable lens 110 a, and the light source 105 a may send data to, and receive data from, the computer 120 a over a wired or wireless connection. The computer 120 a includes a control module 122 and a lens position adjustment module 126. The computer 120 a optionally includes an autofocus module 116.

The autofocus module 116 can adjust the setting of the lens assembly 108 a to set the correct focus position for the sample 104 a based on, for example, visible light or some reference illumination. The focus position of the lens assembly 108 a can then remain the same for the image captures for each of the different hyperspectral bands used. The tunable lens 110 a then makes adjustments for each image capture (e.g., for each hyperspectral band), not to adjust for any change in the distance 114 a of the sample 104 a, but to compensate for the way that different wavelengths of light will result in different focus distances through the lens assembly 108 a. In other words, while the focus position of the lens assembly 108 a remains set, the adjustments to the tunable lens 110 a can ensure that the combination of the tunable lens 110 a and the lens assembly 108 a consistently focus each different band of light reflected from the sample 104 a onto the sensor plane of the camera 106 a. Of course, other implementations can be made which use the tunable lens 110 a for autofocus. For example, the autofocus module 116 may determine a setting of the tunable lens 110 a that sets the overall focus of the tunable lens 110 a and the lens assembly 108 a to be appropriate for a particular wavelength band, to account for the distance 114 a of the sample 104 a and the camera's sensor. Then, the lens position adjustment module 126 can apply offsets or adjustments to that tunable lens position determined from autofocus, varying the tunable lens 110 a setting slightly for each band to account for the different refraction of different wavelengths through the tunable lens 110 a and lens assembly 108 a.

The system 100 a can be configured to capture images of a sample 104 a. In some examples, the sample 104 a may be an object to be inspected. The sample 104 a may be located on a conveyor belt 103 a or another platform or sample holder. The conveyor belt 103 a may convey the sample 104 a to a position within a field of view of the camera 106 a. In some examples, the sample 104 a can be a piece of fruit to be inspected. The fruit can be inspected, for example, for indications of ripeness, bruises, decay, and mold. In some examples, the conveyor belt 103 a may convey the sample 104 a through the field of view of the camera 106 a en route to a destination, e.g., as part of a packing system.

When the sample 104 a is within the field of view of the camera 106 a, the camera 106 a can capture light provided by the light source 105 a and reflected from the sample 104 a. The light source 105 a can produce light in multiple spectral bands. The spectral bands used in hyperspectral image capture can include light from spectral bands across the electromagnetic spectrum. For example, spectral bands can include visible light with wavelengths that fall between and within red, green, and blue spectral bands. Spectral bands can also include light with wavelengths that fall between and within ultraviolet light spectral bands and infrared light spectral bands.

The camera 106 a can generate images of the sample 104 a using the reflected light. In some examples, the images of the sample 104 a can be provided on a display for analysis by a human inspector. In some examples, the images of the sample 104 a can be provided for analysis by a computer image analysis system.

The camera 106 a can be an optical camera that can generate images from light in multiple spectral bands. For example, the camera 106 a may be able to detect and generate images from spectral bands within regions of visible light, near infrared (NIR) light, infrared (IR) light, short wave infrared (SWIR) light, and near ultraviolet (NUV) light, and potentially ultraviolet light (UV) and other wavelength ranges also.

In some examples, the camera 106 a may include a charge-coupled device (CCD) sensor, a complementary metal-oxide semiconductor (CMOS) image sensor, or an Indium Gallium Arsenide (InGaAs) sensor. In some examples, a system for hyperspectral imaging may include multiple cameras in order to capture light from broad ranges of the electromagnetic spectrum. An example of a system that includes multiple cameras is shown in FIG. 3 .

The lens assembly 108 a can be any appropriate lens assembly 108 a for focusing received light on sensors of the camera 106 a. The lens assembly 108 can include, for example, a fixed focal length lens, a telecentric lens, or a microscope lens. In some examples, the lens assembly 108 a can have a variable focal length and may be manually or electrically adjustable.

The tunable lens 110 a can be any high-resolution electrically tunable lens. The tunable lens 110 a may be positioned to receive light before the light enters the lens assembly 108 a. For example, the tunable lens 110 a may be positioned such that the lens assembly 108 a is located between the tunable lens 110 a and the camera 106 a, as shown in FIG. 1A. In some examples, the tunable lens 110 a may be positioned to receive light after the light passes through the lens assembly 108 a. For example, the tunable lens 110 a may be positioned in between the lens assembly 108 a and the camera 106 a.

The tunable lens 110 a can include, for example, a fluid lens. The fluid lens may be controlled by an electromagnetic actuator. The tunable lens 110 a may be capable of focusing light from widely variable working distances, or sample ranges. For example, the sample 104 a may be positioned at a sample distance 114 a, as measured from the tunable lens 110 a. The tunable lens 110 a may be capable of focusing light reflected from the sample 104 a both when the sample 104 a is positioned at small sample distance 114 a, e.g., 50 millimeters (mm), and when the sample 104 a is positioned at a large sample distance 114 a, e.g., 1000 mm.

The sample distance 114 a may be variable. In some examples, due to variations in sizes of samples, the sample range may be different for each individual sample. For example, a large sample may have a smaller sample distance 114 a, while a small sample may have a larger sample distance 114 a. In some examples, the camera 106 a may be adjustable, such that the camera 106 a may be repositioned to decrease or increase the sample distance 114 a.

The electromagnetic actuator can be activated to adjust a position of the tunable lens 110 a. Adjusting the positon of the tunable lens 110 a can include adjusting a deflection, or curvature, of the lens. In some examples, the tunable lens 110 a may adjust the position of the tunable lens in response to receiving a signal from the computer 120 a.

Adjusting the position of the tunable lens 110 a can change the optical power of the tunable lens 110 a. The optical power of the tunable lens may be expressed, for example, in units of diopters (dpt). A diopter is a unit of measurement equal to a reciprocal of a focal length of a lens, as measured in meters. Thus, a higher optical power indicates a smaller, or nearer, focal length. The tunable lens 110 may be able to adjust quickly. For example, the tunable lens 110 may be able to adjust from a first optical power, e.g., 1 dpt, to a second optical power, e.g., 5 dpt, within a few milliseconds.

FIG. 2A shows an example diagram 200 a of tunable lens position In FIG. 2A, a neutral lens position 250 can be defined as a position in which the tunable lens has a deflection of zero. Deflection can be defined as a distance between a center of the tunable lens and the neutral position, e.g., measured in millimeters.

When activated, the electromagnetic actuator can adjust the deflection of the tunable lens. For example, the lens may initially be at initial lens position 230. When activated, the electromagnetic actuator may adjust the lens by moving the lens from initial lens position 230 to final lens position 240. The final lens position 240 then has a lens deflection 220. In FIG. 2A, positive deflections can be shown as deflecting to the right, and negative deflections can be shown as deflecting to the left.

Light waves with different wavelengths can behave differently when they interact with a lens. For example, light with smaller wavelengths may generally diffract more than light with larger wavelengths. To focus light from various wavelengths onto a sensor of the camera 106 a at a particular distance, or focal length, from the tunable lens 110 a, deflection of the tunable lens 110 a can be adjusted based on the wavelength of light illuminating the sample 104 a.

The light source 105 a can illuminate the sample 104 a with light of various illumination wavelengths 124 a. In some examples, the light source 105 can include multiple light-emitting diodes (LEDs) configured to produce light of various wavelengths. For example, different LEDs may be configured to produce light within different spectral bands. The computer 120 a can then selectively activate the LEDs so that only the LEDs providing light of the desired spectral band are active, thus illuminating the sample with light of the desired spectral band.

The dark chamber 102 a can be configured to prevent external light from illuminating the sample 104 a. In some examples, the light source 105 a, the camera 106 a, the lens assembly 108 a, the tunable lens 110 a, and the sample 104 a may be enclosed within the dark chamber 102 a. In some examples, some of these components may be positioned outside of the dark chamber 102 a. For example, the camera 106 a and the lens assembly 108 a may be positioned outside of the dark chamber 102 a, while the tunable lens 110 a is positioned within the dark chamber 102 a. In some examples, the conveyor belt 103 a may convey the sample 104 a into the dark chamber 102 a during imaging, and may convey the sample 104 a outside of the dark chamber 102 a after imaging.

The light source 105 a can produce light within spectral bands as determined by the control module 122. In some examples, as controlled by the control module 122, the light source 105 a may produce light in a particular wavelength sequence or scanning pattern. For example, the light source 105 may increase illumination wavelength 124 a progressively over time, or decrease illumination wavelength 124 a progressively over time. In some examples, the control module 122 can control the illumination wavelength 124 a emitted by the light source 105 a by activating particular LEDs in sequence.

In an example, the control module 122 may control LEDs of the light source 105 a to increase illumination wavelength 124 a progressively over time from an NUV spectral band of the electromagnetic spectrum to a NIR spectral band. The light source 105 a may include, for example, twenty-four LEDs, each configured to produce light within a particular spectral band between the NUV band and the NIR band. The control module 122 can activate a first LED of the light source 105 a at a first time. The first LED can illuminate the sample 104 a with light in the NUV band. At a second time, the control module 122 can deactivate the first LED, and activate a second LED. The second LED can illuminate the sample 104 a with light of a larger wavelength, e.g., light within a violet spectral band. The control module 122 can continue to activate and deactivate LEDs at different times, in sequence, allowing image capture for each spectral band in turn as the system progresses through each of the spectral bands to be captured. As an example, FIG. 1C shows two different groups of bands for comparison. A first set of bands 180 shows the image capture response for red, green, and blue bands used in typical visible-light imaging. A second set of bands 190 shows an example of twenty four spectral bands that may be used for hyperspectral imaging. For example, for each sample an image of the sample can be taken with each of the twenty four bands illustrated. The hyperspectral bands can include several bands in non-visible wavelength ranges, such as multiple bands in each of the NIR, IR, SWIR ranges, multiple bands in each of the NUV, UV, and other ranges. Of course, depending on the application, different numbers of bands and different bands from those indicated in FIG. 1C can be used for hyperspectral imaging.

In addition to controlling the illumination wavelength 124 a of light produced by the light source 105 a, the control module 122 can also provide the illumination wavelength 124 a to the lens position adjustment module 126. Based on the illumination wavelength 124 a, the lens position adjustment module 126 can then adjust a lens position 130 a of the tunable lens 110 a.

The lens position adjustment module 126 can receive the illumination wavelength 124 a from the control module 122. The lens position adjustment module 126 can reference a Wavelength to Lens Deflection Table 128 in order to determine the lens position 130 a.

FIG. 2B illustrates an example table 200 b associating light wavelengths 210 with lens deflection 220. The table 200 b can be, for example, a Wavelength to Lens Deflection Table 128 for a particular tunable lens 110 a.

The table 200 b includes a range of wavelengths 210, expressed in units of nanometers (nm). For each wavelength 210, the table 200 b provides a corresponding lens deflection 220. In FIG. 2B, only a few wavelengths 210 are shown. However, the table 200 b can include any number of wavelengths 210 at any appropriate increment. In some examples, the table 200 b can be generated through a calibration process performed prior to operation of the hyperspectral imaging system.

The lens deflection 220 can be a positive or negative value. The lens deflection 220 can be in reference, e.g., to the neutral lens position 250. Positive values of lens deflection 220 can indicate increasing deflection, e.g., adjusting to the right as shown in FIG. 2A.

The lens position adjustment module 126 can reference the table 200 b to determine the lens deflection 220 for the illumination wavelength 124 a. For example, the illumination wavelength may be 700 nm. Based on the table 200 b, the lens position adjustment module 126 can determine a corresponding lens deflection 220 of 0.10 mm. The lens may initially be in initial lens position 230, with a deflection, e.g., of 0.05 mm. The lens position adjustment module 126 can output the lens position 240, with the deflection 220 of 0.10 mm.

Referring back to FIG. 1 , the lens position adjustment module 126 can output the lens position 130 a to the tunable lens 110 a. The tunable lens 110 a can then adjust to the lens position 130 a designated by the lens position adjustment module 126. In some examples, the tunable lens 110 a adjusts to the lens position 130 a at the same time that the light source 105 a illuminates the sample 104 a with light at the illumination wavelength 124 a. In some examples, the tunable lens 110 a adjusts to the lens position 130 a prior to the light source 105 a illuminating the sample 104 a with light at the illumination wavelength 124 a. In some examples, the tunable lens 110 a adjusts to the lens position 130 a after the light source 105 a illuminates the sample 104 a with light at the illumination wavelength 124 a.

In some implementations, the computer 120 a includes a autofocus module 116. The autofocus module 116 can be used to adjust the focus of the lens assembly 108 a and/or the tunable lens 110 a based on a distance 114 a to the sample 104 a. In some examples, the autofocus module 116 may adjust the tunable lens 110 a before the lens position adjustment module 126 outputs the lens position 130 a to the tunable lens 110 a. For example, when the sample 104 a is positioned within the field of view of the camera 106 a, the camera 106 a may determine the sample distance 114 a. For example, the camera 106 a may measure the sample distance 114 a using one or more range detection techniques. The camera 106 may determine the sample distance 114 a, e.g., using phase detection autofocus, contrast detection autofocus, or other autofocus techniques.

The camera 106 a and/or the autofocus module 116 can determine the sample distance 114 a. The autofocus module 116 can then select an autofocus lens position 118 based on the sample distance 114 a. This could be a setting of the lens assembly 108 a, which may include autofocus motors to adjust the position of lens elements. In the example of FIG. 1 , however, the autofocus module provides a lens autofocus setting to the lens position adjustment module 126 to be implemented using the tunable lens 110 a. For example, the autofocus lens position 118 can include a number of millimeters offset from the neutral lens position 250 of the tunable lens 110 a. The autofocus module 116 can output the autofocus lens position 118 to the lens position adjustment module 126. The lens position adjustment module 126 may then output a lens position 130 a that accounts for the sample distance 114 a as well as the illumination wavelength 124 a. In other words, the lens position 130 a output by the lens position adjustment module 126 may be a position that includes the setting determined by the autofocus module 116, further adjusted by an offset corresponding to the wavelength band currently being used, where the offset is determined using the table 128.

Though the system 100 a includes the autofocus module 116, the system 100 a may use other techniques to adjust lens position based on varying sample ranges. For example, as will be described with reference to FIG. 3 , the lens position adjustment module 126 may include a multi-range wavelength-to-lens-deflection table in addition to, or instead of, the autofocus module 116. The multi-range wavelength-to-lens-deflection table can include calibration data for various sample ranges. In some implementations, if the sample distances can vary significantly, different levels of spectral-band-based adjustments may be needed for different distance ranges. The system may be calibrated so that, for example, one wavelength-to-lens-deflection table is used for one range of sample distances, another wavelength-to-lens-deflection table is used for another range of sample distances, and so on.

To generate hyperspectral images of the sample 104 a, the light source 105 a illuminates the sample 104 a with light at the illumination wavelength 124 a, while the dark chamber 102 a blocks out external light. The light reflects from the sample 104 a. The tunable lens 110 a is positioned to a deflection based on the illumination wavelength 124 a. The tunable lens 110 a receives light reflected from the sample 104 a and can focus the light through the lens assembly 108 a to the sensors of the camera 106 a. The camera 106 a generates the images of the sample 104 a.

The control module 122 may maintain a particular illumination wavelength 124 a for a period of time, e.g., a number of milliseconds or seconds. Following the period of time, the control module 122 may then select a next illumination wavelength 124 a. The control module 122 can then output the next illumination wavelength 124 a to the light source 105 a and to the lens position adjustment module 126 in order to re-adjust the lens position 130 a.

FIG. 1B shows an example system 100 b for hyperspectral imaging provided automated lens adjustment. The system 100 b uses a filter wheel 115 to filter the light incident to a camera in order to capture an image using light for a specific spectral band. The system 100 b includes a camera 106 b, a lens assembly 108 b, a tunable lens 110 b, a light source 105 b, and a filter wheel 115. The camera 106 b and the tunable lens 110 b may be similar to the camera 106 a and the tunable lens 110 a described with reference to FIG. 1A. The camera 106 b, the tunable lens 110 b, and the filter wheel 115 may be in electrical communication with a computer 120 b or other control system. The computer 120 b may be similar to the computer 120 a, and may include a control module, a lens position adjustment module, and optionally a autofocus module.

Unlike the light source 105 a presented in FIG. 1A, the light source 105 b might not be tunable. Rather, the light source 105 b may illuminate the sample 104 b with light of multiple spectral bands simultaneously. For example, the light source 105 may activate LEDs of multiple spectral bands concurrently, so that the incident light on the sample 104 b is not limited to the single spectral band currently used for imaging.

Additionally, unlike the system 100 a, the system 100 b might not include a dark chamber. Rather, the filter wheel 115 can filter out light that is not within a selected spectral band so that the image sensor of the camera 106 b receives substantially only light of the selected spectral band. The filter wheel 115 can include multiple filters. Each filter can filter out various wavelengths of light, only allowing a narrow band of wavelengths to pass to the tunable lens 110 a.

The filter wheel 115 can be positioned between a sample 104 b and the tunable lens 110 b. The filters of the filter wheel 115 may be arranged such that an individual filter aligns with the tunable lens 110 b at a given time. The filter wheel 115 can then rotate, using a motor or other electromechanical actuator, to align a different individual filter with the tunable lens 110 b and allow light for a different spectral band to be passed to the camera 106 b.

In some examples, as controlled by the computer 120 b, e.g., a control module of the computer 120 b, the filter wheel 115 may filter for selected filter wavelengths 124 b in a particular wavelength sequence or scanning pattern. For example, the control module may increase filter wavelength 124 b progressively over time, or decrease filter wavelength 124 b progressively over time. In some examples, the control module can control the filter wavelength 124 b by rotating the filter wheel 115 to align selected filters with the tunable lens 110 b.

In an example, the control module may rotate the filter wheel 115 to increase filter wavelength 124 b progressively over time from a yellow spectral band of the electromagnetic spectrum to a SWIR spectral band. The control module can rotate the filter wheel 115 to align a first filter with the tunable lens 110 b at a first time. The tunable lens 110 b can receive energy reflected from the sample 104 b at a first filter wavelength 124 b, e.g., within the yellow spectral band. At a second time, the control module can rotate the filter wheel 115 to align a second filter with the tunable lens 110 b. The tunable lens 110 b can receive energy reflected from the sample 104 b at a second filter wavelength 124 b, e.g., within an orange spectral band. The control module can continue to rotate the filter wheel 115 to align different filters with the tunable lens 110 b, progressing through spectral bands to the SWIR band.

In addition to controlling the filter wavelength 124 b of light filtered by the filter wheel 115, the control module can also provide the filter wavelength 124 b to the lens position adjustment module. Based on the filter wavelength 124 b, the lens position adjustment module can then adjust a lens position 130 b of the tunable lens 110 b. Adjustment of the lens position 130 b based on the filter wavelength 124 b can be performed as described with reference to FIGS. 1A, 2A, and 2B.

To generate hyperspectral images of the sample 104 b, the light source 105 b illuminates the sample 104 b with light from multiple spectral bands, and the light reflects from the sample 104 b. The filter wheel 115 filters out light that is not within the selected spectral band. The tunable lens 110 b is positioned to a deflection based on the filter wavelength 124 b. The tunable lens 110 b receives light reflected from the sample 104 b and can focus the light through the lens assembly 108 b to the sensors of the camera 106 b. The camera 106 b generates the images of the sample 104 b.

The control module may maintain a particular filter wavelength 124 b for a period of time. Following the period of time, the control module may then select a next filter wavelength 124 b. The control module can output the next filter wavelength 124 b to the filter wheel 115 and to the lens position adjustment module in order to re-adjust the lens position 130 b.

FIG. 3 shows an example system 300 for hyperspectral imaging using multiple cameras. The system 300 includes a first camera 306 with a lens assembly 308 and a tunable lens 310. The system 300 includes a second camera 346 with lens assembly 348 and tunable lens 340. The system 300 also includes a light source 305 and a dark chamber 302. In some examples, the system 300 may include one or more filter wheels instead of, or in addition to, the dark chamber. The first camera 306, the tunable lens 310, the second camera 346, the tunable lens 340, and the light source 305 may be in electrical communication with a computer 320 or other control system. The computer 320 includes a control module 322 and a lens position adjustment module 326.

The first camera 306 may be a same type or a different type of camera than the second camera 346. For example, the first camera 306 may be a visible light camera, and the second camera 346 may be an infrared camera. In another example, the first camera 306 may be a camera with a InGaAs image sensor to capture images for bands in the range of 850-1700 nm, and the second camera 346 may be a camera with a CMOS image sensor that is used to capture images for bands in the range of 380-1000 nm. In the example of an InGaAs sensor and a CMOS sensor, the combination provides a wide range of sensitivity, e.g., 380-1700 nm, with a much less expensive and much higher resolution than would be possible with typical single sensors covering the same range.

A system with multiple cameras may have several advantages over a system with a single camera. For example, a system with multiple cameras may be able to detect light from a broader range of wavelengths than a system with a single camera. As a result, a system with multiple cameras may be able to produce higher quality, better resolution hyperspectral images than a system with a single camera.

The first camera 306 may be positioned at a same distance or at a different distance from the sample than the second camera 346. For example, a sample distance 314 for the first camera 306 may be greater than, less than, or equal to a sample distance 312 for the second camera 346. The sample distance 314 may be different from the sample distance 312 due to the camera 346 being positioned at a different height than the camera 306. The multiple cameras may be positioned at different heights, for example, in order to obtain images of a sample 304 from approximately a same perspective, e.g., a direct overhead view. In some examples, space may be limited within the black box 302. Thus, the multiple cameras may be stacked, or positioned at different heights, to reduce space occupied by the multiple cameras.

The computer 320 can store calibration data that enables the images from the different cameras 306, 346 to be aligned. Similarly, the computer 320 can control the cameras 306, 346 and their respective lenses to focus at the same or similar plane of focus on the sample 304.

The lens assembly 308 and the tunable lens 310 may be similar to or different from the lens assembly 348 and the tunable lens 340. For example, the lens assembly 308 may be fixed focal length lens assembly, while the lens assembly 348 may be a variable focal length lens assembly. In another example, the tunable lens 310 may have a maximum optical power of 15 dpt while the tunable lens 340 may have a maximum optical power of 10 dpt.

In some examples, as described with reference to FIG. 1A, the light source 305 may produce light in a particular wavelength sequence or scanning pattern. The control module 322 may control LEDs of the light source 305 to vary illumination wavelength 324 over time.

In addition to controlling the illumination wavelength 324 of light produced by the light source 305, the control module 322 can also provide the illumination wavelength 324 to the lens position adjustment module 326. Based on the illumination wavelength 324, the lens position adjustment module 326 can then adjust lens position 330 of the tunable lens 310, lens position 350 of the tunable lens 340, or both.

The lens position adjustment module 326 receives the illumination wavelength 324 from the control module 322. The lens position adjustment module 326 also receives the sample distance 312 from the first camera 306 and the sample distance 314 from the second camera 346. The lens position adjustment module 326 can reference a Multi-Range Wavelength-to-Lens-Deflection Table 328 in order to determine the lens positions 330 and 350. In some implementations, each camera 306, 346 (and its corresponding lenses) has a different table 328 based on its own characteristics and positioning.

The camera 306 and the camera 346 are positioned at different heights with respect to the sample 304. The adjustment of each tunable lens 310, 340, may be based in part on the sample distances 312, 314. The sample distances 312, 314 may vary over time. For example, the sample distances 312, 314 may change as samples of different sizes are provided for imaging. A smaller sample 304 will generally cause the sample distances 312, 314 to increase, while a larger sample 304 will generally cause the sample distances 312, 314 to increase. When a small sample 304, e.g., a sample 304 with a small height 303, is presented, the sample distances 312, 314 will increase. When a larger sample 304, e.g., a sample 304 with a larger height 303, is presented, the sample distances 312, 314 will decrease. The lens position adjustment module 326 can adjust the tunable lenses 310, 340 to accommodate these changes in sample ranges using the Multi-Range Wavelength-to-Lens-Deflection Table 328.

The sample distances 312, 314 may also vary based on configurations of the cameras 306, 346. For example, the camera 306, 346 may be adjustable in height, e.g., in the direction of height 303. The cameras 306, 346 may each be raised and/or lowered, e.g., by an operator. When the cameras 306, 346 are raised or lowered, the sample distances 312, 314 will change. The lens position adjustment module 326 can adjust the tunable lenses 310, 340 to accommodate these changes in height using Multi-Range Wavelength-to-Lens-Deflection Table 328.

FIG. 4 shows an example table 400 b associating light wavelengths 410 and sample ranges 414 with lens deflection 420. The table 400 b can be, for example, a Multi-Range Wavelength to Lens Deflection Table 328 for a particular tunable lens 310 or 340. Although FIG. 4B shows a single table 400 b, the lens position adjustment module 326 may include a first table for the first camera 306 and a second table for the second camera 346. Each individual table may be based on characteristics of the specific combination of camera, lens assembly, and tunable lens used.

The table 400 b includes a range of wavelengths 410. For each wavelength 410, the table 400 b provides a corresponding lens deflection 420 at a number of different sample ranges 414. In FIG. 4B, only a few wavelengths 410 and sample ranges 414 are shown. However, the table 400 b can include any number of wavelengths 410 at any appropriate increment. In some examples, the table 400 b can be generated through a calibration process performed prior to operation of the hyperspectral imaging system.

The lens deflection 420 can be a positive or negative value. The lens deflection 420 can be in reference, e.g., to a neutral lens position 430. Positive values of lens deflection 420 can indicate increasing deflection, e.g., adjusting to the right as shown in FIG. 4A.

The lens position adjustment module 326 can reference the table 400 b to determine the lens deflection 420 for the illumination wavelength 410 and the sample range 414. For example, the illumination wavelength may be 800 nm and the sample distance 312 for the first camera 306 may be 80 mm. Based on the table 400 b, the lens position adjustment module 326 can determine a corresponding lens deflection 420 of 0.20 mm. The tunable lens 310 may be in an initial neutral lens position 430, with a deflection of 0 mm. The lens position adjustment module 326 can output the lens position 440, with the deflection 420 of 0.20 mm, to the tunable lens 310.

The multi-range table 328 for a camera can be used in different ways in different implementations. As one example, the multi-range table 328 can incorporate focus information due to differing sample distances from the camera's sensor. Thus, the deflection value for a given sample distance and wavelength band may represent a combined adjustment to both correct for chromatic aberration and set the focus for the specified sample distance. In another example, the focus position to account for the sample distance may be determined separate from the multi-range table 328, and may even be set using the non-tunable lens elements. The different values of deflection based on different sample distances may represent different adjustments to correct for chromatic aberration, without adjusting the focus for different sample distances. For example, the non-tunable lens assembly may be used to focus for sample distance, or an autofocus module may supply a separate focus adjustment for the tunable lens, and the distance-based deflection values in the table 328 may indicate different levels of chromatic aberration correction for different sample distances, to be applied on top of the distance-based autofocus parameters.

Though the system 300 includes the Multi-Range Wavelength-to-Lens-Deflection Table 328, the system 300 may use other techniques to adjust lens position based on varying sample ranges. For example, as was described with reference to FIGS. 1A and 1B, the computer 320 may include a autofocus module in addition to, or instead of, the Multi-Range Wavelength-to-Lens-Deflection Table 328. The autofocus module may output an autofocus lens position to the lens position adjustment module 326. The lens position adjustment module 126 may then reference a wavelength-to-lens-deflection table to determine a lens position for each camera 306, 346 that accounts for the sample ranges as well as the illumination wavelengths.

Referring back to FIG. 3 , the lens position adjustment module 326 can output the lens position 330 to the tunable lens 310, and the lens position 350 to the tunable lens 340. The tunable lenses 310, 340 can then adjust to the lens positions 330, 350 designated by the lens position adjustment module 326.

To generate hyperspectral images of the sample 304, the light source 305 illuminates the sample 304 with light at the illumination wavelength 324, while the dark chamber 302 blocks out external light. The light reflects from the sample 304. The tunable lenses 310 and 340 are positioned to deflections based on the illumination wavelength 324 and the sample distances 312 and 314, respectively. The tunable lenses 310 and 340 receive light reflected from the sample 304 and can focus the light through the respective lens assemblies 308, 348 to the sensors of the respective cameras 306, 346. The cameras 306, 346 generate the images of the sample 304.

While the adjustments made by the lens position adjustment module 326 tune the tunable lenses 310, 340 based on each camera's characteristics and position, additional calibration and adjustment between the camera 304, 306 may be necessary to generate an image of the sample 304. For example, the cameras 306, 346 may each output image data to the computer 320. The computer 320 can then adjust and combine the image data from each camera 304, 306 to generate a hyperspectral image of the sample 304. The computer 320 can use calibration data to account for differences between the spectral bands detected by each camera, and differences in height and perspective between the multiple cameras.

FIG. 5 shows an example process 500 that can be executed according implementations of the present disclosure. The process 500 can be executed by a control system, for example, the computer 120 a of FIG. 1A.

The process 500 includes storing focus adjustment data for an imaging system that includes a tunable lens (502), selecting a spectral band from among multiple different spectral bands (504), controlling an electrically-controllable element of the imaging system to set a selected spectral band for image capture (506), retrieving a focus adjustment parameter indicated by the focus adjustment data that corresponds to the selected spectral band (508), controlling the tunable lens to adjust the tunable lens based on the retrieved focus adjustment parameter that corresponds to the selected spectral band (510), and capturing an image of a subject using the image sensor while the electrically-controllable element sets the selected spectral band and while the tunable lens is adjusted based on the retrieved focus adjustment parameter (512). In greater detail, the process 500 includes storing focus adjustment data for an imaging system that includes a tunable lens (502). The focus adjustment data can be stored in one or more data storage devices. The imaging system includes an electrically-controllable element configured to selectively set each of multiple different spectral bands for image capture. The focus adjustment data indicates different focus adjustment parameters corresponding to different spectral bands. For example, the focus adjustment data can indicate a wavelength deflection corresponding to different spectral bands. The focus adjustment data can include a lookup table including one or more focus adjustment parameters for each of the different spectral bands. The tunable lens can be an electro-wetting lens, a liquid crystal lens, or a polymer-based liquid lens.

The process 500 includes selecting a spectral band from among the multiple different spectral bands (504). The multiple different spectral bands can include multiple spectral bands outside a visible range of light. For example, the spectral bands can include bands within NIR, SWIR, and NUV regions of light.

The process 500 includes controlling the electrically-controllable element of the imaging system to set the selected spectral band for image capture (506). In some examples, the electrically-controllable element can be a light source including a set of light-producing elements that are configured to produce light of the different spectral bands. For example, the electrically-controllable element can be a light source including LEDs that produce light of various wavelengths. The control system can be configured to selectively activate the light-producing elements. In some examples, the electrically-controllable element is a filter assembly including multiple filters each configured to filter light to provide a different one of the different spectral bands. For example, the electrically-controllable element can be a filter wheel. The control system can be configured to selectively apply the filters to set the selected spectral band for image capture.

The process 500 includes retrieving the focus adjustment parameter indicated by the focus adjustment data that corresponds to the selected spectral band (508). The focus adjustment parameters can include, for each of multiple spectral bands, a predetermined adjustment for the spectral band. The adjustment can be configured to compensate for a difference between a focal length of the lens assembly for the spectral band and a focal length of the lens assembly for a reference spectral band.

The process 500 includes controlling the tunable lens to adjust the tunable lens based on the retrieved focus adjustment parameter that corresponds to the selected spectral band (510). The operations can include determining a sequence in which to illuminate the subject in the different spectral bands of light, and controlling the electrically-controllable element to sequentially set different spectral bands of light for image capture in the determined sequence. For example, the sequence may be a scanning sequence.

The operations can include adjusting the tunable lens to sequentially apply the focus adjustment parameters for the different spectral bands in a sequence that corresponds to the sequence for illuminating the subject. Changes to the adjustment of the tunable lens can be synchronized with changes in the spectral band of light set by the electrically-controllable element. The control system can be configured to instruct the adjustment to the tunable lens based on the retrieved focus adjustment parameter that corresponds to the selected spectral band before the electrically-controllable element adjusts the system to use light of the selected spectral band. In some examples, the control system is configured to perform autofocus adjustment to set a focus position of the lens assembly or the tunable lens based on a distance of the subject from the image sensor. The adjustment to the tunable lens can be based on the retrieved focus adjustment parameter and can be applied in addition to the autofocus adjustment.

The process 500 includes capturing an image of a subject using the image sensor while the electrically-controllable element sets the selected spectral band for image capture and while the tunable lens is adjusted based on the retrieved focus adjustment parameter that corresponds to the selected spectral band (512). The operations can include capturing a set of hyperspectral image data for the subject. The set of hyperspectral image data can include an image for each of the multiple different spectral bands. Each of the images can be captured while the electrically-controllable element sets a different spectral band for image capture. The tunable lens can be adjusted according to the focus adjustment parameter that corresponds to the spectral band set for image capture by the electrically-controllable element.

A number of implementations have been described. Nevertheless, it will be understood that various modifications may be made without departing from the spirit and scope of the disclosure. For example, various forms of the flows shown above may be used, with steps re-ordered, added, or removed.

All of the functional operations described in this specification may be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. The techniques disclosed may be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer-readable medium for execution by, or to control the operation of, data processing apparatus. The computer readable-medium may be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter affecting a machine-readable propagated signal, or a combination of one or more of them. The computer-readable medium may be a non-transitory computer-readable medium. The term “data processing apparatus” encompasses all apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus may include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them. A propagated signal is an artificially generated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal that is generated to encode information for transmission to suitable receiver apparatus.

A computer program (also known as a program, software, software application, script, or code) may be written in any form of programming language, including compiled or interpreted languages, and it may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program may be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.

The processes and logic flows described in this specification may be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows may also be performed by, and apparatus may also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).

Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read only memory or a random access memory or both. The essential elements of a computer are a processor for performing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer may be embedded in another device, e.g., a tablet computer, a mobile telephone, a personal digital assistant (PDA), a mobile audio player, a Global Positioning System (GPS) receiver, to name just a few. Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory may be supplemented by, or incorporated in, special purpose logic circuitry.

To provide for interaction with a user, the techniques disclosed may be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user may provide input to the computer. Other kinds of devices may be used to provide for interaction with a user as well; for example, feedback provided to the user may be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user may be received in any form, including acoustic, speech, or tactile input.

Implementations may include a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a client computer having a graphical user interface or a Web browser through which a user may interact with an implementation of the techniques disclosed, or any combination of one or more such back end, middleware, or front end components. The components of the system may be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (“LAN”) and a wide area network (“WAN”), e.g., the Internet.

The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

While this specification contains many specifics, these should not be construed as limitations, but rather as descriptions of features specific to particular implementations. Certain features that are described in this specification in the context of separate implementations may also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation may also be implemented in multiple implementations separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination may in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system components in the implementations described above should not be understood as requiring such separation in all implementations, and it should be understood that the described program components and systems may generally be integrated together in a single software product or packaged into multiple software products.

Thus, particular implementations have been described. Other implementations are within the scope of the following claims. For example, the actions recited in the claims may be performed in a different order and still achieve desirable results. 

What is claimed is:
 1. A system comprising: an image sensor; an electrically-controllable element arranged to set a spectral band for image capture by (i) selectively providing light for a selected spectral band of multiple different spectral bands or (ii) selectively filtering light to a selected spectral band of the multiple different spectral bands; a lens assembly; a tunable lens that is electrically adjustable to change a focal length of the tunable lens; one or more data storage devices storing focus adjustment data that indicates different focus adjustment parameters corresponding to the different spectral bands; a control system configured to perform operations comprising: selecting a spectral band from among the multiple different spectral bands; controlling the electrically-controllable element to set the selected spectral band for image capture; retrieving the focus adjustment parameter that corresponds to the selected spectral band; controlling the tunable lens to adjust the tunable lens based on the retrieved focus adjustment parameter that corresponds to the selected spectral band; and capturing an image of a subject using the image sensor while the electrically-controllable element sets the selected spectral band for image capture and while the tunable lens remains adjusted based on the retrieved focus adjustment parameter that corresponds to the selected spectral band.
 2. The system of claim 1, wherein the operations comprise capturing a set of hyperspectral image data for the subject, the set of hyperspectral image data comprising an image for each of the multiple different spectral bands, wherein each of the images is captured while (i) the electrically-controllable element sets a different spectral band for image capture and (ii) the tunable lens is adjusted according to the focus adjustment parameter that corresponds to the spectral band set for image capture by the electrically-controllable element.
 3. The system of claim 2, wherein the operations comprise: determining a sequence in which to illuminate the subject in the different spectral bands of light; controlling the electrically-controllable element to sequentially set different spectral bands of light for image capture in the determined sequence; and adjusting the tunable lens to sequentially apply the focus adjustment parameters for the different spectral bands in a sequence that corresponds to the sequence for illuminating the subject, wherein changes to the adjustment of the tunable lens are synchronized with changes in the spectral band of light set by the electrically-controllable element.
 4. The system of claim 2, wherein the multiple different spectral bands comprise multiple spectral bands outside a visible range of light.
 5. The system of claim 1, wherein the focus adjustment parameters comprise, for each of multiple spectral bands, a predetermined adjustment for the spectral band that is configured to compensate for a difference between (i) a focal length of the lens assembly for the spectral band and (ii) a focal length of the lens assembly for a reference spectral band.
 6. The system of claim 1, wherein the tunable lens is an electro-wetting lens, a liquid crystal lens, or a polymer-based liquid lens.
 7. The system of claim 1, wherein the control system is configured to instruct the adjustment to the tunable lens based on the retrieved focus adjustment parameter that corresponds to the selected spectral band before the electrically-controllable element adjusts the system to use light of the selected spectral band.
 8. The system of claim 1, wherein the electrically-controllable element is a light source comprising a set of light-producing elements that are configured to produce light of the different spectral bands, and wherein the control system is configured to selectively activate the light-producing elements.
 9. The system of claim 1, wherein the electrically-controllable element is a filter assembly comprising multiple filters each configured to filter light to provide a different one of the different spectral bands, and wherein the control system is configured to selectively apply the filters to set the selected spectral band for image capture.
 10. The system of claim 1, wherein the control system is configured to perform autofocus adjustment to set a focus position of the lens assembly or the tunable lens based on a distance of the subject from the image sensor, and wherein the adjustment to the tunable lens based on the retrieved focus adjustment parameter is applied in addition to the autofocus adjustment.
 11. The system of claim 1, wherein the focus adjustment data comprises a lookup table comprising one or more focus adjustment parameters for each of the different spectral bands.
 12. A method comprising: storing, in one or more data storage devices, focus adjustment data for an imaging system that includes a tunable lens, wherein the imaging system comprises an electrically-controllable element configured to selectively set each of multiple different spectral bands for image capture, and wherein the focus adjustment data indicates different focus adjustment parameters corresponding to the different spectral bands; selecting a spectral band from among the multiple different spectral bands; controlling the electrically-controllable element to set the selected spectral band for image capture; retrieving the focus adjustment parameter that corresponds to the selected spectral band; controlling the tunable lens to adjust the tunable lens based on the retrieved focus adjustment parameter that corresponds to the selected spectral band; and capturing an image of a subject using the image sensor while the electrically-controllable element sets the selected spectral band for image capture and while the tunable lens is adjusted based on the retrieved focus adjustment parameter that corresponds to the selected spectral band.
 13. The method of claim 12, wherein controlling the electrically-controllable element to set the selected spectral band for image capture comprises controlling an electrically-controllable light source to output light for the selected spectral band.
 14. The method of claim 12, wherein controlling the electrically-controllable element to set the selected spectral band for image capture comprises controlling an electrically-controllable filter assembly to filter light to the selected spectral band.
 15. The method of claim 12, comprising capturing a set of hyperspectral image data for the subject, the set of hyperspectral image data comprising an image for each of the multiple different spectral bands, wherein each of the images is captured while (i) the electrically-controllable element sets a different spectral band for image capture and (ii) the tunable lens is adjusted according to the focus adjustment parameter that corresponds to the spectral band set for image capture by the electrically-controllable element.
 16. The method of claim 15, comprising: determining a sequence in which to illuminate the subject in the different spectral bands of light; controlling the electrically-controllable element to sequentially set different spectral bands of light for image capture in the determined sequence; and adjusting the tunable lens to sequentially apply the focus adjustment parameters for the different spectral bands in a sequence that corresponds to the sequence for illuminating the subject, wherein changes to the adjustment of the tunable lens are synchronized with changes in the spectral band of light set by the electrically-controllable element.
 17. The method of claim 15, wherein the multiple different spectral bands comprise multiple spectral bands outside a visible range of light.
 18. The method of claim 12, wherein the focus adjustment parameters comprise, for each of multiple spectral bands, a predetermined adjustment for the spectral band that is configured to compensate for a difference between (i) a focal length of the lens assembly for the spectral band and (ii) a focal length of the lens assembly for a reference spectral band.
 19. The method of claim 12, wherein the tunable lens is an electro-wetting lens, a liquid crystal lens, or a polymer-based liquid lens.
 20. One or more non-transitory computer-readable media storing software instructions that, when executed by one or more processing devices, cause the one or more processing devices to perform operations comprising: storing focus adjustment data for an imaging system that includes a tunable lens, wherein the imaging system comprises an electrically-controllable element configured to selectively set each of multiple different spectral bands for image capture, and wherein the focus adjustment data indicates different focus adjustment parameters corresponding to the different spectral bands; selecting a spectral band from among the multiple different spectral bands; controlling the electrically-controllable element to set the selected spectral band for image capture; retrieving the focus adjustment parameter that corresponds to the selected spectral band; controlling the tunable lens to adjust the tunable lens based on the retrieved focus adjustment parameter that corresponds to the selected spectral band; and capturing an image of the subject using the image sensor while the electrically-controllable element sets the selected spectral band for image capture and while the tunable lens is adjusted based on the retrieved focus adjustment parameter that corresponds to the selected spectral band. 